@font-face {
	font-family: 'pingfang-medium';  // 定义字体名称 和下面对应
	src: url('https://yxyapi.perfectprompt.top/static/PingFangSC-Medium.woff2'); // 引入字体路径
	font-display: block;
}
@font-face {
	font-family: 'pingfang-heavy';  // 定义字体名称 和下面对应
	src: url('https://yxyapi.perfectprompt.top/static/PingFangSC-Heavy.woff2'); // 引入字体路径
	font-display: block;
}

.pingfang-medium{
	font-family: 'pingfang-medium';
}
.pingfang-heavy{
	font-family: 'pingfang-heavy';
}

.relative,
.rela {
	position: relative;
}

.absolute,
.abso {
	position: absolute;
}

// nvue不能用标签命名样式，不能放在微信组件中，否则微信开发工具会报警告，无法使用标签名当做选择器
/* #ifndef APP-NVUE */
image {
	display: inline-block;
}
body{
	font-family: 'pingfang-medium';
}
// 在weex，也即nvue中，所有元素默认为border-box
view,scroll-view,swiper,swiper-item,
text {
	box-sizing: border-box;
}
// 半透明白色
.lucency-fff{
	color: rgba(255,255,255,.5);
}
/* #endif */

.font-xs {
	font-size: 22rpx;
}

.font-sm {
	font-size: 26rpx;
}

.font-md {
	font-size: 28rpx;
}

.font-lg {
	font-size: 30rpx;
}

.font-xl {
	font-size: 34rpx;
}

.flex-between {
	display: flex;
	align-items: center;
  justify-content: space-between;
}

.flex-center{
  display: flex;
  justify-content: center;
  align-items: center;
}
.flex{
  display: flex;
}
.flex-wrap {
	flex-wrap: wrap;
}

.flex-nowrap {
	flex-wrap: nowrap;
}

.col-center {
	align-items: center;
}

.col-top {
	align-items: flex-start;
}

.col-bottom {
	align-items: flex-end;
}

.row-center {
	justify-content: center;
}

.row-left {
	justify-content: flex-start;
}

.row-right {
	justify-content: flex-end;
}

.row-between {
	justify-content: space-between;
}

.row-around {
	justify-content: space-around;
}

.text-left {
	text-align: left;
}

.text-center {
	text-align: center;
}

.text-right {
	text-align: right;
}

.flex-col {
	display: flex;
	flex-direction: column;
}

// 定义flex等分
@for $i from 0 through 12 {
	.flex-#{$i} {
		flex: $i;
	}
}

// 定义字体(px)单位，小于20都为px单位字体
@for $i from 9 to 80 {
	.font-#{$i} {
		font-size: $i + px;
	}
}

// 定义字体(rpx)单位，大于或等于20的都为rpx单位字体
@for $i from 20 through 40 {
	.font-#{$i} {
		font-size: $i + rpx;
	}
}

// 定义内外边距，历遍1-80
@for $i from 0 through 80 {
	// 只要双数和能被5除尽的数
	@if $i % 2 == 0 or $i % 5 == 0 {
		// 得出：margin-30或者m-30
		.margin-#{$i}, .m-#{$i} {
			margin: $i + rpx!important;
		}
		
		// 得出：padding-30或者p-30
		.padding-#{$i}, .p-#{$i} {
			padding: $i + rpx!important;
		}

		.p-tb-#{$i}{
			padding-top: $i + rpx !important;
			padding-bottom: $i + rpx !important;
		}
		.p-lr-#{$i}{
			padding-left: $i + rpx !important;
			padding-right: $i + rpx !important;
		}

		.m-tb-#{$i}{
			margin-top: $i + rpx !important;
			margin-bottom: $i + rpx !important;
		}
		.m-lr-#{$i}{
			margin-left: $i + rpx !important;
			margin-right: $i + rpx !important;
		}
		
		@each $short, $long in l left, t top, r right, b bottom {
			// 缩写版，结果如： m-l-30
			// 定义外边距
			.m-#{$short}-#{$i} {
				margin-#{$long}: $i + rpx!important;
			}
			
			// 定义内边距
			.p-#{$short}-#{$i} {
				padding-#{$long}: $i + rpx!important;
			}
			
			// 完整版，结果如：margin-left-30
			// 定义外边距
			.margin-#{$long}-#{$i} {
				margin-#{$long}: $i + rpx!important;
			}
			
			// 定义内边距
			.padding-#{$long}-#{$i} {
				padding-#{$long}: $i + rpx!important;
			}
		}
	}
}

// 重置nvue的默认关于flex的样式
.reset-nvue {
	flex-direction: row !important;
	align-items: center !important;
}